﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="_619BJP.Web.Controllers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	619保健品点评网 -- 保健百科
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <script src="../../Scripts/Component/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="../../Scripts/Component/jquery.smallslider.js" type="text/javascript"></script>
    <link href="../../Content/css/Component/smallslider/smallslider.css" rel="stylesheet" type="text/css" media="screen"/>
    <script src="../../Scripts/Instance/Article/ArticleIndex.js" type="text/javascript"></script>
    <link href="../../Content/css/Instance/Article/ArticleIndex.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/Instance/Article/keyWordList.js" type="text/javascript"></script>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div id="navigation">
        <span>你现在的位置： <a href="/Home/Index">首页</a> ></span> 
        <span > <a href="/Article/ArticleIndex" class="current_nav">保健百科</a></span>
    </div>
    
    <div id="article_rank">
        <div id="img_rank" class="smallslider">
            <ul>
                <li><a href="#"><img src="../../Content/images/u35_original.png" alt="图片标题1"/></a></li>
                <li><a href="#"><img src="../../Content/images/u35_original.png" title="" alt="图片标题2" /></a></li>
                <li><a href="#"><img src="../../Content/images/u35_original.png" title="" alt="图片标题3" /></a></li>
            </ul>
        </div>
        <div id="daily_rank">
            <div id="daily_rank_title"><span>今日焦点</span></div>
            <div id="daily_rank_article">
                <div id="d_article_top">
                    <ul>
                        <%System.Data.DataSet ds_daily_top = (new ArticleController()).GetWeeklyArticle();
                          for (int m = 0; m < 3; m++)
                          {
                              string title = (new _619BJP.Web.Controllers.ArticleController()).TitleForShort(Html.Encode(ds_daily_top.Tables[0].Rows[m]["title"]),15);
                        %>
                            <li><a href="ArticleDetails/<%= Html.Encode(ds_daily_top.Tables[0].Rows[m]["id"])%>" target="_blank"><%=title %></a></li>
                        <%}%>
                    </ul>
                </div>
                <div id="d_article">
                    <ul>
                        <%System.Data.DataSet ds_daily = (new ArticleController()).GetWeeklyArticle();
                          for (int n = 3; n < 10; n++)
                          {
                              string title = (new _619BJP.Web.Controllers.ArticleController()).TitleForShort(Html.Encode(ds_daily.Tables[0].Rows[n]["title"]),16);
                        %>
                            <li><a href="ArticleDetails/<%= Html.Encode(ds_daily.Tables[0].Rows[n]["id"])%>" target="_blank"><%=title %></a></li>
                        <%}%>
                    </ul>
                </div>
            </div>
        </div>
        <div id="weekly_rank">
            <div id="weekly_rank_title"><span>本周热点</span></div>
            <div id="weekly_rank_article">
                <ul>
                    <%System.Data.DataSet ds_week = (new ArticleController()).GetWeeklyArticle();
                      for (int i = 0; i < 3; i++)
                      {
                          string title = (new _619BJP.Web.Controllers.ArticleController()).TitleForShort(Html.Encode(ds_week.Tables[0].Rows[i]["title"]),16);
                    %>
                    <li>
                        <div class="rank_num_top"><span><%=i+1%></span></div>
                        <div class="article_name"><a href="ArticleDetails/<%= Html.Encode(ds_week.Tables[0].Rows[i]["id"])%>" target="_blank"><%= title%></a></div>
                    </li>
                    <%}
                        for (int j = 3; j < 10; j++)
                      {
                            string title = (new _619BJP.Web.Controllers.ArticleController()).TitleForShort(Html.Encode(ds_week.Tables[0].Rows[j]["title"]),15);
                    %>
                    <li>
                        <div class="rank_num"><span><%=j+1%></span></div>
                        <div class="article_name"><a href="ArticleDetails/<%= Html.Encode(ds_week.Tables[0].Rows[j]["id"])%>" target="_blank"><%= title%></a></div>
                    </li>
                    <%} %>                 
                </ul>
            </div>
        </div>
    </div>

    <div id="article_category">
        <ul>
        <%System.Data.DataSet ds = (new ArticleController()).GetArticleCategory();
          for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
          {
        %>
            <li>
                <div class="li_category">
                    <div class="category_title">
                        <span><%= Html.Encode(ds.Tables[0].Rows[i]["category_name"])%></span>
                        <span><a href="/Article/ArticleList/<%=ds.Tables[0].Rows[i]["category_id"].ToString() %>" target="_blank">更多>></a></span>
                    </div>
                    <div class="category_article_list">
                        <img src="../../Content/images/article_category<%=ds.Tables[0].Rows[i]["category_id"].ToString() %>.jpg" />
                        <ul>
                            <%System.Data.DataSet ds_ar = (new ArticleController()).GetArticleByCategory(Convert.ToInt32(ds.Tables[0].Rows[i]["category_id"].ToString()));
                              int a_count = 0;
                              a_count = ds_ar.Tables[0].Rows.Count;
                              if (a_count >= 10) a_count = 10;
                              for (int j = 0; j < a_count; j++)
                              {
                                  string title = (new _619BJP.Web.Controllers.ArticleController()).TitleForShort(Html.Encode(ds_ar.Tables[0].Rows[j]["title"]),14);
                            %>
                            <li>•<a href="ArticleDetails/<%= Html.Encode(ds_ar.Tables[0].Rows[j]["id"])%>" target="_blank"><%= title%></a></li>
                            <%
                              } %>
                        </ul>
                    </div>
                </div>
            </li>
            <%} %>
        </ul>
    </div>

    <div id="keyWord">
        <div class="title">热门搜索</div>
        <div id="keyWord_list">
            <a href="/0/日常" target="_blank">长寿保健</a> 
            <a href="/0/日常" target="_blank">日常保健</a> 
            <a href="/0/咖啡" target="_blank">咖啡保健</a> 
            <a href="/0/针灸" target="_blank">针灸保健</a> 
            <a href="/0/女性" target="_blank">女性保健</a> 
            <a href="/0/经期" target="_blank">经期保健</a> 
            <a href="/0/保健" target="_blank">保健方法</a> 
            <a href="/0/亚健康" target="_blank">亚健康保健</a> 
            <a href="/0/误区" target="_blank">保健误区</a> 
            <a href="/0/养生" target="_blank">养生保健</a> 
            <a href="/0/冬季" target="_blank">冬季保健</a> 
            <a href="/0/孕期" target="_blank">孕期保健</a> 
            <a href="/0/养生" target="_blank">保健养生</a> 
            <a href="/0/老年" target="_blank">老年保健</a> 
            <a href="/0/膳食" target="_blank">膳食保健</a> 
            <a href="/0/食疗" target="_blank">保健食疗</a> 
            <a href="/0/饮食" target="_blank">饮食保健</a> 
            <a href="/0/幼儿" target="_blank">幼儿保健</a> 
        </div>
    </div>

<%--    <div id="lose_weight">
        <div class="title">减肥手册</div>
        <div id="lose_weight_test"></div>
    </div>

    <div id="safe_period">
        <div class="title">安全期自测</div>
        <div id="safe_period_test"></div>
    </div>--%>
</asp:Content>

